import request from '@/utils/request'

export function chaListByCourseId(id) {
  return request({
    url: '/chapter/listByCourseId/'+id,
    method: 'get',
  })
}

export function chaGetById(id) {
  return request({
    url: '/chapter/getById/'+id,
    method: 'get',
  })
}

export function chaSaveOrUpdate(data) {
  return request({
    url: '/chapter/saveOrUpdate',
    method: 'post',
    data
  })
}

export function chaDelete(id) {
  return request({
    url: '/chapter/delete/'+id,
    method: 'get',
  })
}
